var express = require('express');
var router = express.Router();
var {aSchema, gwcSchema} = require('../model/model')

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

router.get('/list', async(req, res)=>{
  let list = await aSchema.find()
  console.log(list);
  
  res.send({
    list
  })
})

module.exports = router;
